<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>json</title>
</head>
<body>

<script>
    var obj = {name: "hanyun",age: "18",sex: "male"};
    var json = JSON.stringify(obj);
    console.log(typeof json);//string
    var jsonobj = JSON.parse(json);
    console.log(typeof jsonobj);//object

</script>
</body>
</html>
